package cn.wtg.kotlinlib.baseViewModel

import android.os.Bundle
import cn.wtg.kotlinlib.baseUi.BaseActivity

/**
 * author: wtg
 * date:2020/3/13 0013
 * desc: ViewModel的基类 activity
 */
abstract class BaseActivityLifecycleVM(mActivity: BaseActivity) : BaseLifecycleVM() {
    protected var mActivity: BaseActivity
    protected var bundle: Bundle? = null

    init {
        this.mActivity = mActivity
        this.initView()
    }

    /**
     * 初始化数据
     */
    open fun initView() {}

    /**
     * 设置 bundle 传递数据
     *
     * @param bundle bundle
     */
    fun setInitBundle(bundle: Bundle?) {
        this.bundle = bundle
    }
}